<?php
// +----------------------------------------------------------------------
// | Copyright © Sogu Technologies Co. Ltd 2018-2050 All rights reserved.
// +----------------------------------------------------------------------
// | File name: LoanOrder.php
// +----------------------------------------------------------------------
// | Author: gxs
// +----------------------------------------------------------------------
// | Description: 放款订单表模型
// +----------------------------------------------------------------------
// | Others: 其他内容的说明
// +----------------------------------------------------------------------
// | History: 修改历史记录列表，每条修改记录应包含修改日期、修改者及修改内容简述
// +----------------------------------------------------------------------
// | 1.Date: 2019/2/28 Author: gxs Modification: 创建
// +----------------------------------------------------------------------

namespace App\ModelTransfers\WsLoans;

use App\ModelTransfers\Base;
use App\ModelTransfers\Traits\LoanRequest;

class LoanOrder extends Base
{
    use LoanRequest;
    protected $table = 'ws_loan.loan_order';

    /**
     * Description: 关联申请表
     * Author: Gxs
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function relationLoanApply()
    {
        return $this->hasOne('App\ModelTransfers\WsLoans\LoanApply', 'id', 'apply_id')->where('is_valid', self::IS_VALID);
    }
}